package com.xmy.cultivate.entity;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import com.xmy.cultivate.enums.ChargeModeEnum;
import lombok.Data;

import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.Date;

/**
 * <p>
 * 课程定价标准
 * </p>
 *
 * @author min
 * @since 2022-07-28
 */
@TableName("course_pricing")
@Data
public class CoursePricing implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * id
     */
    
    private Long id;

    /**
     * 对应course_pirce_school
     */
    
    private Long priceSchoolId;

    /**
     * 课程id
     */
    
    private Long courseId;

    /**
     * 学校id
     */
    
    private Long schoolId;

    /**
     * 数量
     */
    private Integer count;

    /**
     * 单位
     */
    private String countUnit;

    /**
     * 单位价格
     */
    private BigDecimal unitPrice;

    /**
     * 价格
     */
    private BigDecimal price;

    private BigDecimal servePrice;

    private BigDecimal materialsPrice;

    private BigDecimal allPrice;

    /**
     * 收费模式，1按课时收费，2按时间收费，3按期收费
     */
    private ChargeModeEnum chargeMode;

    @TableField(exist = false)
    private Integer version;

    /**
     * 创建人id
     */
    
    //@TableField(fill = FieldFill.INSERT)
    private Long createdId;

    @TableLogic
    private Integer deleted;

    /**
     * created_at
     */
    @TableField(fill = FieldFill.INSERT)
    private LocalDateTime createdAt;

    /**
     * updated_at
     */
    @TableField(fill = FieldFill.UPDATE)
    private LocalDateTime updatedAt;

    /**
     * deleted_at
     */
    private LocalDateTime deletedAt;
}
